package pl.ericpol.environment.devices.lamps;

import pl.ericpol.environment.devices.Device;

public abstract class Lamp implements Device{
	
	private int id;
	
	public Lamp(int id) {
		super();
		this.id = id;
	}

	public abstract void switchOn(int percent);
	
	public abstract int getPercent();
	
	@Override
	public int getState(){
		return getPercent();		
	}
	
	@Override
	public void setState(int state) {
		switchOn(state);
	}
	
	@Override
	public int getId() {
		return id;
	}

	@Override
	public void setId(int id) {
		this.id = id;
	}

}
